class cli(object):
    def __init__(self, name):
        self.name = name
    
    def print_hl(self):
        print "*************************"
        
    def print_info(self, msg):
        print "** " + self.name + " INFO: " + str(msg)
        
    def print_error(self, msg):
        print "** " + self.name + " ERROR: " + str(msg)
    
    def print_menu(self, item_list, accept_input_list):
        while True:
            print "** Choose:"
            for item in item_list:
                print "** " + item
            choice = self.promt()
            for input in accept_input_list:
                if choice == input:
                    return choice
            self.print_error("invalid input")
    def print_msg(self, str):
        print "** " + str
    
    def promt(self):
        return raw_input("** ?> ")
